package com.bosssoft.g1.entity;

import com.bosssoft.g1.common.data.entity.TenantBaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.util.Date;

@Table(name = "basic_role_company")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class RoleCompany extends TenantBaseEntity {

    /**
     * 角色id
     */
    private Long roleId;
    /**
     * 授权公司id
     */
    @Column(
            name = "auth_company_id"
    )
    private Long authCompanyId;
    /**
     * 创建人
     */
    private Long createdBy;
    /**
     *
     */
    private String creator;
    /**
     * 创建时间
     */
    private Date createdTime;
    /**
     * 修改人
     */
    private Long updatedBy;
    /**
     *
     */
    private String modifier;
    /**
     * 修改时间
     */
    private Date updatedTime;
    /**
     * 状态位
     */
    private Byte status;
    /**
     * 版本
     */
    private Long version;

    public void fill(Long id) {
        this.setId(id);
        this.setTenantId(1656205481254977536L);
        this.setVersion(1L);
        this.setCreatedBy(1656205481254977536L);
        this.setUpdatedBy(1656205481254977536L);
        this.setCreatedTime(new Date());
        this.setUpdatedTime(new Date());
        this.setStatus((byte) 0L);
    }
}